#ifndef JDIALOG_H
#define JDIALOG_H

#include <QDialog>
#include "../configargs.h"

#include <QMainWindow>
#include <QWidget>
#include <QtGui/QtGui>
#include <QList>

#define XOFFSET 100
#define XBEGIN  100
#define YOFFSET 100
class QVBoxLayout;
class QHBoxLayout;
class QLabel;
class QFrame;
class QPoint;
class QLayout;
class QComboBox;
class QDirModel;
class QItemSelectionModel;
class QModelIndex;
class QLabel;
class QPushButton;
class QString;

extern bool cpuburn_flag;
extern int  nowhavewifi;

class JDialog: public QDialog
{
    Q_OBJECT
public:
    JDialog(QWidget *parent = 0);
    void slotcked();
    ~JDialog();
    void keyBoardInput(QString text);

	void setLabel(QString type);
	QLabel *label_1;
	QLabel *label_2;


    void setJTitle(QString text);
    void setJLayout(QLayout *pLayout);

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private slots:
    void slotMaxBtnClicked();

private:
    QVBoxLayout *m_pMainLayout;
    QHBoxLayout *m_pTitleLayout;
    QFrame      *m_pTitleFrame;
    QLabel      *m_pTitleLab;
    QPoint      *m_pPressPoint;
    QLayout     *m_pSubLayout;

    bool        m_isTopPoint;
};


class Folder2 : public QDialog
//class FilwWIndow : public QDialog
{
    Q_OBJECT

public:
    explicit Folder2(QWidget *parent = 0,int i=0);
    ~Folder2();
    QDirModel *pdirModel,*pdirModel1;
    QItemSelectionModel* selectionModel;
    QList<QString> pathList;
    int m_pos,m_flag;
    QTreeView *ptreeView;
    QSplitter *psplitter;
    QListView *plistView;
    QString   path;
    int count;
public slots:
    void Selected(const QModelIndex&,const QModelIndex&);
    void changePath(QModelIndex);
};


#endif // JDIALOG_H
